﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApp3
{
    class student
    {
        public string name;
        public int age;
        public string degree;
        public student(string name, int age, string degree)
        {
            this.name = name;
            this.age = age;
            this.degree = degree;
        }
    }


    class Under:student
    {
        string spec;
        public Under(string name, int age, string degree, string spec) : base(name, age, degree)
        {
            this.spec = spec;
            Console.WriteLine("姓名：{0}\n年龄：{1}\n学位：{2}\n专业：{3}",name,age,degree,spec);
        }
    }

    class Gradu:student
    {
        string drec;
        public Gradu(string name, int age, string degree, string drec) : base(name, age, degree)
        {
            this.drec = drec;
            Console.WriteLine("姓名：{0}\n年龄：{1}\n学位：{2}\n研究方向：{3}", name, age, degree,drec);
        }
    }
}
